import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/discount/list',
    method: 'post',
    data
  })
}

export function createDiscount(data) {
  return request({
    url: '/discount/create',
    method: 'post',
    data
  })
}

export function updateDiscount(data) {
  return request({
    url: '/discount/update',
    method: 'post',
    data
  })
}

export function disableDiscount(data) {
  return request({
    url: '/discount/disable',
    method: 'post',
    data
  })
}

export function enableDiscount(data) {
  return request({
    url: '/discount/enable',
    method: 'post',
    data
  })
}
